package com.spark.modules.generation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spark.common.core.Result;
import com.spark.modules.generation.entity.GenModelClassify;
import com.spark.modules.generation.entity.model.GenModelClassifyModel;
import com.spark.modules.generation.mapper.GenModelClassifyMapper;
import com.spark.modules.generation.service.IGenModelClassifyService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 模型分类Service
 *
 * @author LYCHEE
 * @date 2025/02/24 15:24
 */
@Service
public class GenModelClassifyServiceImpl extends ServiceImpl<GenModelClassifyMapper, GenModelClassify> implements IGenModelClassifyService {

    /**
     * 获取模型分类和模型
     *
     * @param searchContent 模型名称或编码
     * @return 分类和模型数据
     */
    @Override
    public Result<?> queryClassifyAndModel(String searchContent) {
        List<GenModelClassifyModel> models = baseMapper.queryClassifyAndModel(searchContent);
        return Result.ok(models);
    }
}
